/*
 * Copyright (c) 2023 Cshoo Org. All Rights Reserved.
 */

package org.cshoo.tattoo.authorize.domain.repository;

import org.cshoo.tattoo.authorize.domain.po.RoleButtonRelation;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

/**
 * @author 杨翼
 * @since 1.0
 */
public interface IRoleButtonRelationRepository extends CrudRepository<RoleButtonRelation, Long> {

    /**
     * 删除觉色的按钮权限
     *
     * @param roleId   角色id
     * @param buttonId 按钮id
     */
    @Modifying
    @Transactional
    void deleteByRoleIdAndButtonId(Long roleId, Long buttonId);

}
